package com.crimsec.utils.snmp.model.dao;

import com.crimsec.utils.snmp.model.Event;
import com.crimsec.utils.snmp.model.Eventdata;
import com.crimsec.utils.snmp.model.Evtype;
import com.crimsec.utils.snmp.model.Mibent;
import java.util.Date;

/**
 * $Id$
 */
public class EventDAO extends AbstractDAO {

    public static Event createTrap(String host, String connectstr) {
        Event result = new Event();
        result.setHost(host);
        result.setConnectstr(connectstr);
        result.setEvtype(Evtype.TRAP);
        result.setRestime(new Date());
        return result;

    }

    public static Eventdata createEvdata(Event event, Mibent ent, String entvalue) {
        Eventdata result = new Eventdata();
        result.setEvent(event);
        result.setMibent(ent);
        result.setEntval(entvalue);
        return result;
    }
}
